Optimal. Leaf size=61 \[ -\frac {x}{a}-\frac {\cot (c+d x) (3-2 \sec (c+d x))}{3 a d}+\frac {\cot ^3(c+d x) (1-\sec (c+d x))}{3 a d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.07, antiderivative size = 61, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 3, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {3973, 3967, 8}
\begin {gather*} \frac {\cot ^3(c+d x) (1-\sec (c+d x))}{3 a d}-\frac {\cot (c+d x) (3-2 \sec (c+d x))}{3 a d}-\frac {x}{a} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 3967
Rule 3973
Rubi steps
\begin {align*} \int \frac {\cot ^2(c+d x)}{a+a \sec (c+d x)} \, dx &=\frac {\int \cot ^4(c+d x) (-a+a \sec (c+d x)) \, dx}{a^2}\\ &=\frac {\cot ^3(c+d x) (1-\sec (c+d x))}{3 a d}+\frac {\int \cot ^2(c+d x) (3 a-2 a \sec (c+d x)) \, dx}{3 a^2}\\ &=-\frac {\cot (c+d x) (3-2 \sec (c+d x))}{3 a d}+\frac {\cot ^3(c+d x) (1-\sec (c+d x))}{3 a d}+\frac {\int -3 a \, dx}{3 a^2}\\ &=-\frac {x}{a}-\frac {\cot (c+d x) (3-2 \sec (c+d x))}{3 a d}+\frac {\cot ^3(c+d x) (1-\sec (c+d x))}{3 a d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.88, size = 100, normalized size = 1.64 \begin {gather*} \frac {\sec (c+d x) \left (-12 d x \cos ^2\left (\frac {1}{2} (c+d x)\right )+\cos \left (\frac {1}{2} (c+d x)\right ) \left (3 \cot \left (\frac {1}{2} (c+d x)\right ) \csc \left (\frac {c}{2}\right )+13 \sec \left (\frac {c}{2}\right )\right ) \sin \left (\frac {d x}{2}\right )-\tan \left (\frac {1}{2} (c+d x)\right )\right )}{6 a d (1+\sec (c+d x))} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.09, size = 59, normalized size = 0.97
method | result | size |
derivativedivides | \(\frac {-\frac {\left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3}+4 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-8 \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )-\frac {1}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}}{4 d a}\) | \(59\) |
default | \(\frac {-\frac {\left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3}+4 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-8 \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )-\frac {1}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}}{4 d a}\) | \(59\) |
risch | \(-\frac {x}{a}+\frac {2 i \left (3 \,{\mathrm e}^{3 i \left (d x +c \right )}-5 \,{\mathrm e}^{i \left (d x +c \right )}-4\right )}{3 d a \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )^{3} \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}\) | \(67\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.48, size = 93, normalized size = 1.52 \begin {gather*} \frac {\frac {\frac {12 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {\sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}}}{a} - \frac {24 \, \arctan \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a} - \frac {3 \, {\left (\cos \left (d x + c\right ) + 1\right )}}{a \sin \left (d x + c\right )}}{12 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 3.09, size = 64, normalized size = 1.05 \begin {gather*} -\frac {4 \, \cos \left (d x + c\right )^{2} + 3 \, {\left (d x \cos \left (d x + c\right ) + d x\right )} \sin \left (d x + c\right ) + \cos \left (d x + c\right ) - 2}{3 \, {\left (a d \cos \left (d x + c\right ) + a d\right )} \sin \left (d x + c\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \frac {\int \frac {\cot ^{2}{\left (c + d x \right )}}{\sec {\left (c + d x \right )} + 1}\, dx}{a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.50, size = 66, normalized size = 1.08 \begin {gather*} -\frac {\frac {12 \, {\left (d x + c\right )}}{a} + \frac {a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 12 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{a^{3}} + \frac {3}{a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}}{12 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.29, size = 65, normalized size = 1.07 \begin {gather*} -\frac {x}{a}-\frac {\frac {4\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{3}-\frac {7\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{6}+\frac {1}{12}}{a\,d\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________